import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/dept',
    name: 'dept',
    component: () => import('../views/tlias/DeptView.vue')
  },
  {
    path: '/test',
    name: 'test',
    component: () => import('../views/chat/MyTest.vue')
  },
  {
    path: '/original',
    name: 'original',
    component: () => import('../views/chat/VideoOriginal.vue')
  },
  {
    path: '/video',
    name: 'video',
    component: () => import('../views/chat/VideoConference.vue')
  },
  {
    path: '/videoTest',
    name: 'videoTest',
    component: () => import('../views/chat/VideoConferenceTest.vue')
  },
  {
    path: '/emp',
    name: 'emp',
    component: () => import('../views/tlias/EmpView.vue')
  },
  {
    path: '/',
    // redirect: '/dept' // 当访问首页时，重定向到请求'/dept'
    redirect: '/videoTest' // 当访问首页时，重定向到请求'/dept'
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/testView',
    name: 'testView',
    component: () => import("../views/testView.vue")
  }
]

const router = new VueRouter({
  routes
})

export default router